package com.game.model;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: tjc
 * @description
 * @Date Created in 21:26 2021-08-12
 */
public class Score {

    private static Map<Integer, Integer> pointMap = new HashMap<>();
    static{
        pointMap.put(1, 10);
        pointMap.put(2, 20);
        pointMap.put(3, 30);
    }

    private int level;

    public Score(int level) {
        this.level = level;
    }

    public int getLevel(){
        return level;
    }

    public int getValue() {
        Integer val = pointMap.get(level);
        return val == null ? 0 : val.intValue();
    }
}
